//
//  SYBuKeInfoTableViewCell.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/7/18.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYBuKeInfoTableViewCell.h"


@interface SYBuKeInfoTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *xuehaoLab;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *jiaocaiLab;
@property (weak, nonatomic) IBOutlet UILabel *keshiLab;
@property (weak, nonatomic) IBOutlet UILabel *leixingLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;


@end


@implementation SYBuKeInfoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setBukeModel:(SYBuKeXinXiModel *)bukeModel {
    _bukeModel = bukeModel;
    self.xuehaoLab.text = bukeModel.serial;
    self.nameLab.text = bukeModel.name;
    self.jiaocaiLab.text = bukeModel.courseName;
    self.keshiLab.text = bukeModel.lesson;
    NSString *type = nil;
    if ([bukeModel.isOnLine isEqualToString:@"是"]) {
        type = @"线上";
    } else {
        type = @"线下";
    }
    
    self.leixingLab.text = type;
    self.timeLab.text = bukeModel.beginDate;
    
}


- (IBAction)lookBtnClick:(UIButton *)sender {
    if (self.block) {
        self.block(_bukeModel);
    }
    
}

@end












